﻿<!DOCTYPE html>
<html class="" lang="zh">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <link rel="stylesheet" type="text/css" href="~/饿了么-开店申请_files/style1503546983737.css">
    <link rel="stylesheet" type="text/css" href="~/饿了么-开店申请_files/style1503546983737.css">
    <meta charset="utf-8">
    <title>饿了么-开店申请</title>
    <script src="~/Models/jquery.js"></script>
    <meta name="description" content="饿了么-开店申请">
    <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="icon" href="https://static2.ele.me/eleme/desktop/media/img/favicon-32x32.png" type="image/x-icon">
    <!-- base href="https://kaidian.ele.me/" -->
    <link href="~/饿了么-开店申请_files/app_002.css" rel="preload" as="style">
    <link href="~/饿了么-开店申请_files/app.css" rel="preload" as="style">
    <link href="~/饿了么-开店申请_files/maps" rel="preload" as="script">
    <link href="~/饿了么-开店申请_files/vendor.js" rel="preload" as="script">
    <link href="~/饿了么-开店申请_files/app.js" rel="preload" as="script">
    <link href="~/饿了么-开店申请_files/maps" rel="preload" as="script">
    <link href="https://shadow.elemecdn.com/npm/vue@2.4.2/dist/vue.min.js" rel="preload" as="script">
    <link href="https://shadow.elemecdn.com/npm/vue-router@2.7.0/dist/vue-router.min.js" rel="preload" as="script">
    <link href="~/饿了么-开店申请_files/app_002.css" rel="stylesheet">
    <link href="~/饿了么-开店申请_files/app.css" rel="stylesheet">

</head>
<body ng-app="nevermore" class="ng-scope">


    <!-- uiView: --><ui-view autoscroll="true" class="ng-scope" style="">
        <header class="row ng-scope ng-isolate-scope" show-user="false">
            <div>
                <!-- ngIf: showUser -->
                <!-- ngIf: !showUser --><a ui-sref="home" class="title ng-scope" ng-if="!showUser" href="https://kaidian.ele.me/"> <span>饿了么商户中心</span> </a><!-- end ngIf: !showUser -->
                <a class="notification-link" ng-click="openNotification()">点击查看《廉正告知书》</a> <!-- ngIf: showUser --> <!-- ngIf: !showUser --><div class="pull-right tips ng-scope" ng-if="!showUser"> <span>如开店过程遇到问题,请咨询 <a href="https://ecs-im.ele.me/?from=visitor-merchant&amp;ezone=open" target="_blank">在线客服</a></span> </div><!-- end ngIf: !showUser -->
            </div>
        </header>
        <div class="main-container ng-scope" ui-view="" autoscroll="true" style="">
            <div class="goods-info step-container ng-scope">
                <form name="goodsInfoForm" id="goodsInfoForm" novalidate="" class="goods-form ng-pristine ng-invalid ng-invalid-required ng-valid-maxlength ng-valid-pattern">
                   
                    <div class="inputs">

                        <div class="form-group flex"> <label class="control-label title">添加菜品</label> </div>
                        <div class="form-group flex">
                            <label for="FoodName" class="control-label"><b class="required">*</b>菜品名称</label>
                            <div class="control-content">
                                <div class="flex input-wrap">
                                    <span class="input-container">
                                        <input name="FoodName" id="FoodName" class="form-control width-400 " maxlength="20" required="" type="text">
                                    </span>

                                </div>
                            </div>
                        </div>
                        <div class="form-group flex">
                            <label class="control-label"><b class="required">*</b>菜品单价</label>
                            <div class="control-content">
                                <div class="flex price">
                                    <div class="input-wrap">
                                        <span class="input-container">
                                            <input name="FoodPrice" class="form-control" required="" type="number">
                                        </span>
                                        <span class="right-label"> 元 </span>
                                        <span class="input-container">
                                            <input name="FoodIn" class="form-control" required="" value=" " type="hidden">
                                        </span>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <div class="form-group flex">
                            <label class="control-label"><b class="required">*</b>菜品类型</label>
                            <div class="control-content">
                                <div class="flex price">
                                    <div class="input-wrap">
                                        <span class="input-container">
                                            <select id="FoodType" class="form-control">
                                                <option>家常小炒</option>
                                                <option>水果</option>
                                            </select>
                                        </span>
                                    </div>
                                    <span class="fee"><b class="required">*</b>状态</span>
                                    <div class="input-wrap">
                                        <span class="input-container">
                                            <select id="FoodState" class="form-control">
                                                <option>在售</option>
                                                <option>售空</option>
                                            </select>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group flex">
                            <label class="control-label"> 商品照片 </label>
                            <div class="control-content">

                                <div class="input-wrap" style="width:400px">
                                    <span class="input-container">
                                        <input name="SPhotoName" class="form-control" required="" value=" " type="file">
                                        <input name="PhotoPath" class="form-control" required="" value=" " type="hidden">
                                    </span>
                                </div>

                            </div>
                        </div>
                        <div class="form-group flex">
                            <label class="control-label"></label>
                            <div class="control-content">
                                <button class="btn btn-primary btn-next" onclick="Add()"> 提交</button>
                            </div>
                        </div>
                    </div>

                </form>
            </div>

        </div>
    </ui-view>
    <script src="~/饿了么-开店申请_files/maps"></script>
    <script src="~/饿了么-开店申请_files/vendor.js"></script>
    <script src="~/饿了么-开店申请_files/app.js"></script>
    <script async="async" src="~/饿了么-开店申请_files/maps"></script>

</body>
</html>
<script>
    function Add() {
        var FoodName = $("#FoodName").val();
        var FoodPrice = $("#FoodPrice").val();
        var FoodIn = $("#FoodIn").val();
        var FoodType = $("#FoodType").val();
        var FoodState = $("#FoodState").val();
        var MerchantsID = $("#MerchantsID").val();
        var PhotoName = $("#PhotoName").val();
        var PhotoPath = $("#PhotoPath").val();
        var HPhotoName = $("#HPhotoName").val();

        $.ajax({
            url: "/Home/DishesAdd",
            type: "post",
            data: {
                FoodName: FoodName,
                FoodPrice: FoodPrice,
                FoodIn: FoodIn,
                FoodType: FoodType,
                FoodState: FoodState,
                MerchantsID: MerchantsID,
                PhotoName: PhotoName,
                PhotoPath: PhotoPath,
                HPhotoName: HPhotoName
            },
            success: function (obj) {
                if (obj == 1) {
                    alert("添加成功");
                    location.href = "/Home/Login";
                }
                else if (obj == 0) {
                    alert("添加失败");

                }
            }
        })

    }
</script>